package com.anjubao.parking.municipal.parkinglot.feign;

import com.anjubao.parking.municipal.common.dto.ApiResult;
import com.anjubao.parking.municipal.parkinglot.dto.EntryEnterDTO;
import com.anjubao.parking.municipal.parkinglot.dto.EntryLeaveDTO;
import com.anjubao.parking.municipal.parkinglot.dto.EntryResDTO;
import com.anjubao.parking.municipal.parkinglot.dto.EntryShotUrlDTO;
import io.swagger.annotations.ApiParam;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;

import javax.validation.Valid;

/**
 * @author anjubao
 */
public interface ParkingRecordFeignService {

    /**
     * 车辆入场记录上报接口
     *
     * @param entryEnterDTO
     * @return
     */
    @PostMapping("/parking-records")
    ApiResult<EntryResDTO> enter(@RequestBody @Valid @ApiParam(value = "车辆入场信息") EntryEnterDTO entryEnterDTO);

    /**
     * 车辆出场记录上报接口
     *
     * @param entryLeaveDTO
     * @return
     */
    @PutMapping("/parking-records")
    ApiResult<EntryResDTO> leave(@RequestBody @Valid @ApiParam(value = "车辆出场信息") EntryLeaveDTO entryLeaveDTO);

    /**
     * 车辆进出图片URL上报接口
     *
     * @param entryShotUrlDTO
     * @return
     */
    @PostMapping("/parking-records/snapshot-url")
    ApiResult<EntryResDTO> snapShotUrl(@RequestBody @Valid @ApiParam(value = "车辆进出图片URL信息") EntryShotUrlDTO entryShotUrlDTO);
}

